package com.andrew.study.anno;

import com.andrew.study.aware.SpringUtil;
import com.andrew.study.config.AnnoConfig;
import com.andrew.study.domain.Address;
import com.andrew.study.domain.User;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotatedBeanDefinitionReader;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class AnnotationContextTest {

	public static void main(String[] args) {

		ApplicationContext context = new AnnotationConfigApplicationContext(AnnoConfig.class);
		User bean = context.getBean(User.class);
		System.out.println(bean);
//		SpringUtil springUtil = beanFactory.getBean(SpringUtil.class);
//		User user = springUtil.getBean(User.class);
//		System.out.println(user);
	}
}
